Dynamic range (DR) is the ratio between the largest and smallest possible values of a changeable quantity. In image processing, the dynamic range DR, often called the “contrast ratio”, is the range of luminance. There often is a large difference between the dynamic range DR of an imaging or display device, and the dynamic range DR of a natural scene. Therefore, when a digital image of a natural scene, reproduced using a digital camera, is displayed on a computer display, it may desirable to compress the dynamic range DR of the digital image by a tone mapping technology. Tone mapping or dynamic range compression (DRC) is often used to decrease the dynamic range DR of a scene's luminance captured on the image sensor of the digital camera. The result is more even exposure in the focal plane, with increased detail in the shadows and low-light areas. Though this doesn't increase the fixed dynamic range DR available at the display, it stretches the usable dynamic range DR in practice.
To perform dynamic range compression DRC, an image is often divide imaged into zones of similar luminance and an algorithm attempts to maintain a local contrast level within the zones. In order to divide the image into the zones, it may be desirable to determine the areas of an image having a similar level of luminance. In order to determine the luminance zones, it may be desirable to apply a low-pass filter.
A conventional low-pass filter may perform linear unilateral filtering by averaging adjacent pixel values. However, a unilateral filter may blur edges, which may mix various luminance zones. It may be desirable to apply a low-pass filter that performs a filtering operation inside each of the luminance zones, but at edges therebetween does not apply the filter, thereby preserving the edges between the luminance zones.
A low-pass filter may have a large radius to average the luminance between pixels which are far apart but still belong to the same luminance zone.
Edge preserving filtering is non-linear filtering technique to smooth images while preserving edges. One edge preserving filtering technique is bilateral filtering. Bilateral filtering is an estimator that considers values across edges to be outliers. In bilateral filtering, the intensity value at each pixel in a digital image is replaced by a weighted average of intensity values from nearby pixels, where the weights depend not only on distance between the pixels but also on the differences in intensity between the pixels such that the weight is decreased between pixels with a large difference in intensity.
By replacing the value of the intensity of each pixel with the bilateral weighted average, sharp edges between luminance zones may be preserved by determining that two pixels are similar to each other based on both whether their spatial locations and similarity with respect to pixel luminance. However, a conventional bilateral filter often requires a large set of pixels to contribute to the weighted average, known as a support, to effectively remove noise while preserving important features, inducing slow processing and high equipment costs.